{SysAdd} = require "./SysAdd"
{Srv} = require "Srv"

SupperClzz = SysAdd
exports["@Role_rigAdd"] = {comment:"角色权限增加"}
exports.Role_rigAdd = new Class
  Extends: SupperClzz
  options:
    enyStr: "Role_rig"
    headArr: ["role_id","menu_id","rg","cg","ug","dg"]
    headObj:
      "role_id":"角色"
      "menu_id":"菜单"
      "rg":"读取"
      "cg":"增加"
      "ug":"修改"
      "dg":"删除"
    $vdts: ["role_id","menu_id"]
  initPg: ->
    t = this
    o = t.options
    elt = o.ele
    yield SupperClzz.prototype.initPg.apply t,arguments
    return
  role_idVdt: (key,val,id)->
    t = this
    o = t.options
    if !val
      return {err:"角色不能为空!"}
    true
  menu_idVdt: (key,val,id)->
    t = this
    o = t.options
    if !val
      return {err:"菜单不能为空!"}
    true
    
